//
//  AccountBookStyleCell.m
//  ProjectOneDemo
//
//  Created by dllo on 16/5/18.
//  Copyright © 2016年 wjg. All rights reserved.
//

#import "AccountBookStyleCell.h"
#import "Common.h"
#define WIDTH [UIScreen mainScreen].bounds.size.width

@implementation AccountBookStyleCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    
    self.contentView.backgroundColor = [UIColor whiteColor];
    
    self.nameLabel = [[UILabel alloc]init];
    self.nameLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.nameLabel];
    self.nameLabel.text = @"账本封面";
    
    
    self.picImageView = [[UIImageView alloc]init];
    self.picImageView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.picImageView];
    self.picImageView.image = [UIImage imageNamed:@"AccountBookCover2.png"];
    
    
    self.arrowImageView = [[UIImageView alloc]init];
    self.arrowImageView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.arrowImageView];
    self.arrowImageView.image = [UIImage imageNamed:@"xiangqian.png"];
    
    self.lineView = [[UIView alloc] init];
    [self.contentView addSubview:_lineView];
    self.lineView.backgroundColor = LIGHT_GRAY;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.nameLabel.frame = CGRectMake(10, 5, 150, 40);
    
    self.picImageView.frame = CGRectMake(WIDTH - 70, 5, 30, 40);
    
    self.arrowImageView.frame = CGRectMake(WIDTH - 30, 15, 20, 20);
    
    self.lineView.frame = CGRectMake(0, self.contentView.frame.size.height - 1, WIDTH, 1);
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
